home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / dviware / dvibook / libtex / gfclass.c < prev    next >
C/C++ Source or Header  |  1994-03-18  |  2KB  |  82 lines

  1. /*
  2.  * Copyright (c) 1987, 1989 University of Maryland
  3.  * Department of Computer Science.  All rights reserved.
  4.  * Permission to copy for any purpose is hereby granted
  5.  * so long as this copyright notice remains intact.
  6.  */
  7.  
  8. #ifndef lint
  9. static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/gfclass.c,v 2.3 89/08/22 21:52:30 chris Exp $";
  10. #endif
  11.  
  12. /*
  13.  * gfclass - GF code classification tables.
  14.  */
  15.  
  16. #include "gfclass.h"
  17.  
  18. /* shorthand---in lowercase for contrast (read on!) */
  19. #define    three(x)    x, x, x
  20. #define    four(x)        x, x, x, x
  21. #define    five(x)        four(x), x
  22. #define    six(x)        four(x), x, x
  23. #define    eight(x)    four(x), four(x)
  24. #define    sixteen(x)    eight(x), eight(x)
  25. #define    thirty_two(x)    sixteen(x), sixteen(x)
  26. #define    sixty_four(x)    thirty_two(x), thirty_two(x)
  27. #define    one_twenty_eight(x) sixty_four(x), sixty_four(x)
  28. #define    one_sixty_five(x) one_twenty_eight(x), thirty_two(x), five(x)
  29.  
  30. /*
  31.  * Length of the single (or first) operand, if any.
  32.  */
  33. char gf_oplen[256] = {
  34.     sixty_four(GPL_NONE),    /* GF_PAINT_0 through GF_PAINT_63 */
  35.     GPL_UNS1,        /* GF_PAINT1 */
  36.     GPL_UNS2,        /* GF_PAINT2 */
  37.     GPL_UNS3,        /* GF_PAINT3 */
  38.     GPL_NONE,        /* GF_BOC */
  39.     GPL_NONE,        /* GF_BOC1 */
  40.     GPL_NONE,        /* GF_EOC */
  41.     GPL_NONE,        /* GF_SKIP0 */
  42.     GPL_UNS1,        /* GF_SKIP1 */
  43.     GPL_UNS2,        /* GF_SKIP2 */
  44.     GPL_UNS3,        /* GF_SKIP3 */
  45.     one_sixty_five(GPL_NONE),/* GF_NEW_ROW_0 through GF_NEW_ROW_164 */
  46.     GPL_UNS1,        /* GF_XXX1 */
  47.     GPL_UNS2,        /* GF_XXX2 */
  48.     GPL_UNS3,        /* GF_XXX3 */
  49.     GPL_SGN4,        /* GF_XXX4 */
  50.     GPL_SGN4,        /* GF_YYY */
  51.     GPL_NONE,        /* GF_NOP */
  52.     GPL_NONE,        /* GF_CHAR_LOC */
  53.     GPL_NONE,        /* GF_CHAR_LOC0 */
  54.     GPL_NONE,        /* GF_PRE */
  55.     GPL_NONE,        /* GF_POST */
  56.     GPL_NONE,        /* GF_POSTPOST */
  57.     six(GPL_NONE)        /* 250 through 255 */
  58. };
  59.  
  60. /*
  61.  * Types of the various opcodes.
  62.  */
  63. char gf_gt[256] = {
  64.     sixty_four(GT_PAINT0),    /* GF_PAINT_0 through GF_PAINT_63 */
  65.     three(GT_PAINT),    /* GF_PAINT1 through GF_PAINT3 */
  66.     GT_BOC,            /* GF_BOC */
  67.     GT_BOC1,        /* GF_BOC1 */
  68.     GT_EOC,            /* GF_EOC */
  69.     GT_SKIP0,        /* GF_SKIP0 */
  70.     three(GT_SKIP),        /* GF_SKIP1 through GF_SKIP3 */
  71.     one_sixty_five(GT_NEW_ROW),/* GF_NEW_ROW_0 throgh GF_NEW_ROW_164 */
  72.     four(GT_XXX),        /* GF_XXX1 through GF_XXX4 */
  73.     GT_YYY,            /* GF_YYY */
  74.     GT_NOP,            /* GF_NOP */
  75.     GT_CHAR_LOC,        /* GF_CHAR_LOC */
  76.     GT_CHAR_LOC0,        /* GF_CHAR_LOC0 */
  77.     GT_PRE,            /* GF_PRE */
  78.     GT_POST,        /* GF_POST */
  79.     GT_POSTPOST,        /* GF_POSTPOST */
  80.     six(GT_UNDEF)        /* 250 through 255 */
  81. };
  82.